Scientific Computing with Scala by Vytautas Jancauskas
Author:Vytautas Jancauskas [Jancauskas, Vytautas]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2016-04-27T04:00:00+00:00
You can also use sortedColsBy() to sort columns the same way as we did for rows. All the arithmetic operations that worked on Series will similarly work on frames. See the following examples. As you can see, only the columns and rows that are represented in both of the frames are present in the results. The elements which lack a corresponding element in the other matrix will be represented by NA:
scala> val f1 = Frame('x' -> Series('a' -> 0.1, 'b' -> 0.2, 'c' -> 0.3), 'y' -> Series('a' -> 0.4, 'b' -> 0.5, 'c' -> 0.6)) f1: org.saddle.Frame[Char,Char,Double] = [3 x 2] x y ------ ------ a -> 0.1000 0.4000 b -> 0.2000 0.5000 c -> 0.3000 0.6000 scala> val f2 = Frame('y' -> Series('b' -> 0.7, 'c' -> 0.8, 'd' -> 0.9), 'z' -> Series('b' -> 1.0, 'c' -> 1.1, 'd' -> 1.2)) f2: org.saddle.Frame[Char,Char,Double] = [3 x 2] y z ------ ------ b -> 0.7000 1.0000 c -> 0.8000 1.1000 d -> 0.9000 1.2000 scala> f1 * f2 res21: org.saddle.Frame[Char,Char,Double] = [4 x 3] x y z -- ------ -- a -> NA NA NA b -> NA 0.3500 NA c -> NA 0.4800 NA d -> NA NA NA scala> f1 - f2 res22: org.saddle.Frame[Char,Char,Double] = [4 x 3] x y z -- ------- -- a -> NA NA NA b -> NA -0.2000 NA c -> NA -0.2000 NA d -> NA NA NA
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12593)
Hello! Python by Anthony Briggs(9928)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9804)
The Mikado Method by Ola Ellnestam Daniel Brolund(9787)
Dependency Injection in .NET by Mark Seemann(9348)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7773)
Grails in Action by Glen Smith Peter Ledbrook(7705)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7568)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7192)
Microservices with Go by Alexander Shuiskov(6955)
Practical Design Patterns for Java Developers by Miroslav Wengner(6873)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6817)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6426)
Angular Projects - Third Edition by Aristeidis Bampakos(6236)
The Art of Crafting User Stories by The Art of Crafting User Stories(5752)
NetSuite for Consultants - Second Edition by Peter Ries(5677)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5492)
Kotlin in Action by Dmitry Jemerov(5076)
